home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 109 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: "nicolas (n.) chapados" <chapados@bnr.ca>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: FW: Inherent C++ problem?
  5. Date: 21 Jan 1996 15:37:04 GMT
  6. Organization: Bell Northern Research
  7. Approved: clamage@eng.sun.com (comp.std.c++)
  8. Message-ID: <4ds2pp$n5p@bmtlh10.bnr.ca>
  9. References: <01BAE696.8C249300@dino.int.com>
  10. NNTP-Posting-Host: taumet.eng.sun.com
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=us-ascii
  13. Content-Transfer-Encoding: 7bit
  14. X-Nntp-Posting-Host: bmtlh567.bnr.ca 
  15. X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/712) 
  16. X-Url: news:01BAE696.8C249300@dino.int.com 
  17. Content-Length: 771
  18. Originator: clamage@taumet
  19.  
  20. Eugene Lazutkin <eugene@int.com> wrote:
  21. >To me, the step (2) can be eliminated by certain amendment to the semantics 
  22. >of the language while (3) seems to be inherent. I wonder though if 
  23. >something could be done about it within the bounds of the current 
  24. >standard...
  25.  
  26. See ARM section 12.1c. "The fundamental rule is that the introduction of
  27. a temporary object and the calls of its constructor/destructor pair may be
  28. eliminated if the only way the user can detect its elimination or
  29. introduction is by observing side effects generated by the constructor
  30. or destructor call."
  31.  
  32. In your case, all temporaries can be eliminated.
  33.  
  34. ----
  35. Nicolas Chapados                          Member of Scientific Staff
  36. chapados@bnr.ca                           Bell-Northern Research Ltd.
  37.  
  38.  
  39. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  40.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  41.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  42.  
  43.